package com.service.impl;

import com.dao.ISmbms_billDao;
import com.dao.ISmbms_providerDao;
import com.dao.ISmbms_roleDao;
import com.dao.ISmbms_userDao;
import com.entity.Smbms_bill;
import com.entity.Smbms_provider;
import com.entity.Smbms_role;
import com.entity.Smbms_user;
import com.service.ISmbms_UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional
@Service("smbms_User")
public class Smbms_UserService implements ISmbms_UserService {

    @Autowired
    private ISmbms_userDao sud;

    @Autowired
    private ISmbms_billDao sbd;

    @Autowired
    private ISmbms_providerDao sp;

    @Autowired
    private ISmbms_roleDao sr;

    @Override
    public Smbms_user selectL(Map<String, String> su) {
        return sud.selectL(su);
    }

    @Override
    public List<Smbms_user> selectAllSR(Map<String, String> mp) {
        return sud.selectAll(mp);
    }

    @Override
    public Smbms_user selectByPrimaryKeySR(Long id) {
        return sud.selectByPrimaryKey(id);
    }

    @Override
    public int deleteByPrimaryKeySR(Long id) {
        return sud.deleteByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelectiveSR(Smbms_user su) {
        return sud.updateByPrimaryKeySelective(su);
    }

    @Override
    public int insertSelectiveSR(Smbms_user su) {
        return sud.insertSelective(su);
    }

    @Override
    public List<Smbms_role> selectAll() {
        return sr.selectAll();
    }

    @Override
    public List<Smbms_bill> selectAll(Map<String, String> mp) {
        return sbd.selectAll(mp);
    }

    @Override
    public List<Smbms_provider> selectAllprovider(Map<String,String> mp) {
        return sp.selectAll(mp);
    }

    @Override
    public int insert(Smbms_bill sb) {
        return sbd.insert(sb);
    }

    @Override
    public Smbms_bill selectByPrimaryKey(Long id) {
        return sbd.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Smbms_bill sb) {
        return sbd.updateByPrimaryKeySelective(sb);
    }

    @Override
    public int deleteByPrimaryKeySP(Long id) {
        return sp.deleteByPrimaryKey(id);
    }

    @Override
    public Smbms_provider selectByPrimaryKeySP(Long id) {
        return sp.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelectiveSP(Smbms_provider spd) {
        return sp.updateByPrimaryKeySelective(spd);
    }

    @Override
    public int insertSelectiveSP(Smbms_provider spd) {
        return sp.insertSelective(spd);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return sbd.deleteByPrimaryKey(id);
    }
}
